.class public Lcom/ninesky/browser/BookmarkHistoryActivity;
.super Landroid/app/TabActivity;

# interfaces
.implements Landroid/widget/TabHost$OnTabChangeListener;


# static fields
.field static a:Ljava/lang/String;

.field static b:Ljava/lang/String;

.field private static f:Ljava/lang/String;

.field private static g:Ljava/lang/String;

.field private static h:Lcom/ninesky/browser/az;


# instance fields
.field private final c:Z

.field private d:Landroid/content/Intent;

.field private e:I


# direct methods
.method static constructor <clinit>()V
    .locals 1

    const-string v0, "bookmark"

    sput-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->f:Ljava/lang/String;

    const-string v0, "visited"

    sput-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->g:Ljava/lang/String;

    const-string v0, "history"

    sput-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->a:Ljava/lang/String;

    const-string v0, "tab"

    sput-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->b:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .locals 1

    invoke-direct {p0}, Landroid/app/TabActivity;-><init>()V

    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/ninesky/browser/BookmarkHistoryActivity;->c:Z

    return-void
.end method

.method static a()Lcom/ninesky/browser/az;
    .locals 1

    sget-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->h:Lcom/ninesky/browser/az;

    if-nez v0, :cond_0

    new-instance v0, Lcom/ninesky/browser/az;

    invoke-direct {v0}, Lcom/ninesky/browser/az;-><init>()V

    sput-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->h:Lcom/ninesky/browser/az;

    :cond_0
    sget-object v0, Lcom/ninesky/browser/BookmarkHistoryActivity;->h:Lcom/ninesky/browser/az;

    return-object v0
.end method

.method private a(Landroid/content/Intent;ILjava/lang/String;)V
    .locals 5

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getResources()Landroid/content/res/Resources;

    move-result-object v0

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getTabHost()Landroid/widget/TabHost;

    move-result-object v1

    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v2

    const v3, 0x7f030027

    const/4 v4, 0x0

    invoke-virtual {v2, v3, v4}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v2

    const v3, 0x7f0c007d

    invoke-virtual {v2, v3}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/TextView;

    invoke-virtual {v0, p2}, Landroid/content/res/Resources;->getText(I)Ljava/lang/CharSequence;

    move-result-object v0

    invoke-virtual {p0, v0}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    invoke-virtual {v1, p3}, Landroid/widget/TabHost;->newTabSpec(Ljava/lang/String;)Landroid/widget/TabHost$TabSpec;

    move-result-object v0

    invoke-virtual {v0, v2}, Landroid/widget/TabHost$TabSpec;->setIndicator(Landroid/view/View;)Landroid/widget/TabHost$TabSpec;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/widget/TabHost$TabSpec;->setContent(Landroid/content/Intent;)Landroid/widget/TabHost$TabSpec;

    move-result-object v0

    invoke-virtual {v1, v0}, Landroid/widget/TabHost;->addTab(Landroid/widget/TabHost$TabSpec;)V

    return-void
.end method


# virtual methods
.method final a(ILandroid/content/Intent;)V
    .locals 0

    iput p1, p0, Lcom/ninesky/browser/BookmarkHistoryActivity;->e:I

    iput-object p2, p0, Lcom/ninesky/browser/BookmarkHistoryActivity;->d:Landroid/content/Intent;

    return-void
.end method

.method public finish()V
    .locals 2

    iget v0, p0, Lcom/ninesky/browser/BookmarkHistoryActivity;->e:I

    iget-object v1, p0, Lcom/ninesky/browser/BookmarkHistoryActivity;->d:Landroid/content/Intent;

    invoke-virtual {p0, v0, v1}, Lcom/ninesky/browser/BookmarkHistoryActivity;->setResult(ILandroid/content/Intent;)V

    invoke-super {p0}, Landroid/app/TabActivity;->finish()V

    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 6

    const/4 v5, 0x0

    invoke-super {p0, p1}, Landroid/app/TabActivity;->onCreate(Landroid/os/Bundle;)V

    const v0, 0x7f030001

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->setContentView(I)V

    const/4 v0, 0x3

    invoke-virtual {p0, v0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->setDefaultKeyMode(I)V

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getTabHost()Landroid/widget/TabHost;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/widget/TabHost;->setOnTabChangedListener(Landroid/widget/TabHost$OnTabChangeListener;)V

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getExtras()Landroid/os/Bundle;

    move-result-object v0

    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/ninesky/browser/BookmarksActivity;

    invoke-direct {v1, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v2, "android.intent.action.PICK"

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getIntent()Landroid/content/Intent;

    move-result-object v3

    invoke-virtual {v3}, Landroid/content/Intent;->getAction()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v2

    if-eqz v2, :cond_0

    if-nez v0, :cond_4

    new-instance v0, Landroid/os/Bundle;

    invoke-direct {v0}, Landroid/os/Bundle;-><init>()V

    :goto_0
    const-string v2, "definedQuickBookMark"

    const-string v3, "definedQuickBookMark"

    invoke-virtual {v0, v2, v3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    :cond_0
    if-eqz v0, :cond_1

    invoke-virtual {v1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    :cond_1
    const v2, 0x7f07007a

    sget-object v3, Lcom/ninesky/browser/BookmarkHistoryActivity;->f:Ljava/lang/String;

    invoke-direct {p0, v1, v2, v3}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a(Landroid/content/Intent;ILjava/lang/String;)V

    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/ninesky/browser/BookmarksActivity;

    invoke-direct {v1, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    if-nez v0, :cond_5

    new-instance v2, Landroid/os/Bundle;

    invoke-direct {v2}, Landroid/os/Bundle;-><init>()V

    :goto_1
    const-string v3, "mostVisited"

    const/4 v4, 0x1

    invoke-virtual {v2, v3, v4}, Landroid/os/Bundle;->putBoolean(Ljava/lang/String;Z)V

    invoke-virtual {v1, v2}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    const v2, 0x7f07007b

    sget-object v3, Lcom/ninesky/browser/BookmarkHistoryActivity;->g:Ljava/lang/String;

    invoke-direct {p0, v1, v2, v3}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a(Landroid/content/Intent;ILjava/lang/String;)V

    new-instance v1, Landroid/content/Intent;

    const-class v2, Lcom/ninesky/browser/HistoryActivity;

    invoke-direct {v1, p0, v2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const/4 v2, 0x0

    if-eqz v0, :cond_6

    invoke-virtual {v1, v0}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent;

    sget-object v2, Lcom/ninesky/browser/BookmarkHistoryActivity;->b:Ljava/lang/String;

    invoke-virtual {v0, v2}, Landroid/os/Bundle;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    :goto_2
    const v2, 0x7f07007c

    sget-object v3, Lcom/ninesky/browser/BookmarkHistoryActivity;->a:Ljava/lang/String;

    invoke-direct {p0, v1, v2, v3}, Lcom/ninesky/browser/BookmarkHistoryActivity;->a(Landroid/content/Intent;ILjava/lang/String;)V

    if-eqz v0, :cond_2

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getTabHost()Landroid/widget/TabHost;

    move-result-object v0

    const/4 v1, 0x2

    invoke-virtual {v0, v1}, Landroid/widget/TabHost;->setCurrentTab(I)V

    :cond_2
    invoke-static {}, Landroid/webkit/WebIconDatabase;->getInstance()Landroid/webkit/WebIconDatabase;

    new-instance v0, Lcom/ninesky/browser/ca;

    invoke-direct {v0, p0}, Lcom/ninesky/browser/ca;-><init>(Lcom/ninesky/browser/BookmarkHistoryActivity;)V

    new-array v1, v5, [Ljava/lang/Void;

    invoke-virtual {v0, v1}, Lcom/ninesky/browser/ca;->execute([Ljava/lang/Object;)Landroid/os/AsyncTask;

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getTabHost()Landroid/widget/TabHost;

    move-result-object v0

    new-instance v1, Landroid/graphics/drawable/ColorDrawable;

    invoke-direct {v1, v5}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0}, Landroid/widget/TabHost;->getCurrentView()Landroid/view/View;

    move-result-object v0

    const v2, 0x1020002

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/FrameLayout;

    if-eqz p0, :cond_3

    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->setForeground(Landroid/graphics/drawable/Drawable;)V

    :cond_3
    return-void

    :cond_4
    new-instance v2, Landroid/os/Bundle;

    invoke-direct {v2, v0}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V

    move-object v0, v2

    goto/16 :goto_0

    :cond_5
    new-instance v2, Landroid/os/Bundle;

    invoke-direct {v2, v0}, Landroid/os/Bundle;-><init>(Landroid/os/Bundle;)V

    goto :goto_1

    :cond_6
    move-object v0, v2

    goto :goto_2
.end method

.method protected onPause()V
    .locals 0

    invoke-super {p0}, Landroid/app/TabActivity;->onPause()V

    invoke-static {p0}, Lcom/mobclick/android/c;->a(Landroid/content/Context;)V

    return-void
.end method

.method protected onResume()V
    .locals 0

    invoke-super {p0}, Landroid/app/TabActivity;->onResume()V

    invoke-static {p0}, Lcom/mobclick/android/c;->b(Landroid/content/Context;)V

    return-void
.end method

.method public onTabChanged(Ljava/lang/String;)V
    .locals 3

    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getLocalActivityManager()Landroid/app/LocalActivityManager;

    move-result-object v0

    invoke-virtual {v0, p1}, Landroid/app/LocalActivityManager;->getActivity(Ljava/lang/String;)Landroid/app/Activity;

    move-result-object v0

    if-eqz v0, :cond_0

    const/4 v1, 0x1

    invoke-virtual {v0, v1}, Landroid/app/Activity;->onWindowFocusChanged(Z)V

    :cond_0
    invoke-virtual {p0}, Lcom/ninesky/browser/BookmarkHistoryActivity;->getTabHost()Landroid/widget/TabHost;

    move-result-object v0

    new-instance v1, Landroid/graphics/drawable/ColorDrawable;

    const/4 v2, 0x0

    invoke-direct {v1, v2}, Landroid/graphics/drawable/ColorDrawable;-><init>(I)V

    invoke-virtual {v0}, Landroid/widget/TabHost;->getCurrentView()Landroid/view/View;

    move-result-object v0

    const v2, 0x1020002

    invoke-virtual {v0, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object p0

    check-cast p0, Landroid/widget/FrameLayout;

    if-eqz p0, :cond_1

    invoke-virtual {p0, v1}, Landroid/widget/FrameLayout;->setForeground(Landroid/graphics/drawable/Drawable;)V

    :cond_1
    return-void
.end method
